package com.doctor.utils.popwindow;

import android.app.Activity;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;



/**
 * Created by nieyunlong
 * 支付的pop
 * on 2016/9/30.
 */
public class PayPopWindow extends BasePopWindow implements View.OnClickListener {
    private View popView;
    /**
     * 支付宝
     */
    private RelativeLayout rl_pay_zhifubao;
    /**
     * 微信
     */
    private RelativeLayout rl_pay_wechat;
    /**
     * 取消
     */
    private LinearLayout ll_cancel;
//    private OnclickListener listener;
    /**
     * 外层
     */
    private LinearLayout ll_waiceng;

//    public void setOnClickListener(OnclickListener listener) {
//        this.listener = listener;
//    }

    public PayPopWindow(Activity activity) {
        super(activity);
        initView();
        setListener();
        initPopwindow(popView);
        touchDismiss(popView,ll_waiceng);
    }


    private void initView() {
//        popView = inflater.inflate(R.layout.pop_pay, null);
//        rl_pay_zhifubao = (RelativeLayout) popView.findViewById(R.id.rl_pay_zhifubao);
//        rl_pay_wechat = (RelativeLayout) popView.findViewById(R.id.rl_pay_wechat);
//        ll_cancel = (LinearLayout) popView.findViewById(R.id.ll_cancel);
//        ll_waiceng = (LinearLayout) popView.findViewById(R.id.ll_waiceng);
    }

    private void setListener() {
        rl_pay_zhifubao.setOnClickListener(this);
        rl_pay_wechat.setOnClickListener(this);
        ll_cancel.setOnClickListener(this);
    }

    @Override
    public void setOnCance() {

    }

    @Override
    public void onClick(View v) {
        int vId = v.getId();
//        if (listener != null) {
//            listener.onClick(v);
//        }
//        if (vId == R.id.ll_cancel) {
//            dismiss();
//        }
    }
}
